-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extractIr task dependencies are configured correctly #1128
base: develop
Are you sure you want to change the base?
Conversation
Generate changelog in
|
965b8e2
to
99cd1c8
Compare
import org.gradle.api.tasks.OutputDirectory; | ||
import org.gradle.api.tasks.Sync; | ||
|
||
public abstract class ExtractConjureIrTask extends Sync { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely my preferred way of writing all Gradle tasks in plugins now, making an implementation of the standard task type with real input/output properties.
gradle-conjure/src/main/java/com/palantir/gradle/conjure/ExtractConjureIrTask.java
Outdated
Show resolved
Hide resolved
Provider<File> conjureIrFile = extractConjureIr.map( | ||
irTask -> new File(irTask.getDestinationDir(), project.getName() + ".conjure.json")); | ||
Provider<File> conjureIrFile = extractConjureIr | ||
.flatMap(task -> task.getConjureIr().file(project.getName() + ".conjure.json")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this sets up the task dependency correctly (you can run with --dry-run
)? This seems functionally the same to me as the previous code, except with some added custom types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
womp:
Querying the mapped value of map(flatmap(provider(task 'extractConjureIr', class com.palantir.gradle.conjure.ExtractConjureIrTask))) before task ':remote-api:extractConjureIr' has completed is not supported
Whew, so I've updated this PR based on feedback, and I believe it does make the code easier to follow, and probably gives gradle more information to help us. However, I don't believe any change is necessary in this project as the root cause appears to be resolved by: palantir/sls-packaging#1417 |
==COMMIT_MSG==
extractIr task dependencies are configured correctly
==COMMIT_MSG==